<template>
  <div>
    <h1>博为峰</h1>
    <button @click="testPush()">html</button>
    <button @click="testReplace()">css</button>
    <button @click="go()">go</button>
    <button @click="back()">back</button>
  </div>

</template>

<script>
  export default {
    methods: {
      testPush() {
        this.$router.push({
          path: '/course'
        })
      },
      testReplace() {
        this.$router.replace({
          path: '/course'
        })
      },
      go(){
        this.$router.go(1)//number参数
      },
      back(){
        this.$router.back();//没有参数，后退一步
      }
    },
  }
</script>

<style>
</style>
